var publicJs = require("../../../../public.js");
var WxParse = require('../../../wxParse/wxParse.js');
Page({
  data: {},
  onLoad: function (options) {
    var that = this;
    that.setData({
      newsId: options.newsId
    })
    publicJs.JsonPost("News/getNewsInfoById", {
      newsId: this.data.newsId
    }, function (res) {
      console.log(res);
      wx.setNavigationBarTitle({
        title: res.newsCate.cate_name//页面标题为路由参数
      });
      WxParse.wxParse('newsCont', 'html', publicJs.htmldecode(res.newsInfo.content), that, 15);
      that.setData({
        newsTit: res.newsInfo.title,
        newsTime: publicJs.formatTime(res.newsInfo.create_time, 'Y/M/D h:m:s'),
      });
    })
  }
})